package com.example.demo.demos.web.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

@Data
public class UserRegDTO {
//    @NotBlank(message = "用户名不能为null、空字符串和空白串")
//    @NotEmpty(message = "用户名不能为null空字符串")
//    @NotNull(message = "用户名不能为null")
//    @Size(min = 6,max = 12,message = "用户名必须在6-12位之间")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{0,7}|^[a-zA-Z]{0,14}$", message = "用户名最长14个英文或者7个汉字")
    @ApiModelProperty(value = "用户名",required = true,example = "Tony")
    private String username;
    @ApiModelProperty(value = "密码",required = true)
    private String password;
    @ApiModelProperty(value = "昵称",required = true)
    private String nickname;
}
